//
//  ZHBUpLoadManager.h
//  SelectPhotosOrVideoContentViewLib
//
//  Created by Dubaoquan on 2019/1/11.
//

#import <Foundation/Foundation.h>
#import <Photos/Photos.h>
#import "SelectImageOrVideoContentView.h"
@import UIKit;

typedef void (^ResultHandler)(BOOL success,NSString*sourceKey);

typedef void (^SingleResultHandler)(BOOL success);

typedef void(^UpImgsRequest)(id imgsPathObject);


@interface ZHBUpLoadManager : NSObject

@property (nonatomic,strong) NSString *releaseSuccessedNotificationName;//上传成功后的NotificationName

+(instancetype)sharedInstance;

-(void)prepareWithTokenType:(NSString*)tokenType;

-(void)uploadVideoWith:(PHAsset *)asset  videoKey:(NSString*)videoKey videoName:(NSString*)videoName coverImage:(UIImage*)coverImage coverImageFileNameKey:(NSString*)coverImageFileNameKey coverImagePostKeyName:(NSString*)coverImagePostKeyName videoPath:(NSString*)videoPath postURL:(NSString*)postURLStr parameters:(NSDictionary*)parameters notificationName:(NSString*)notificationName;

-(void)uploadImageWith:(NSArray<UIImage *>*)imageDataArr imagefileNameKey:(NSString*)imagefileNameKey  imagePostKeyName:(NSString*)imagePostKeyName postURL:(NSString*)postURLStr parameters:(NSDictionary*)parameters  notificationName:(NSString*)notificationName;

/// 上传图片组
/// @param imageDataArr s图片数组
/// @param imagefileNameKey 和后台协定h链接后缀
/// @param imagePostKeyName 数组对应key
/// @param postURLStr 接口
/// @param parameters 其他参数字典
/// @param notificationName 通知名
-(void)uploadImagesWith:(NSArray<UIImage *>*)imageDataArr imagefileNOPathNameKey:(NSString*)imagefileNameKey  imagePostKeyName:(NSString*)imagePostKeyName postURL:(NSString*)postURLStr parameters:(NSDictionary*)parameters  notificationName:(NSString*)notificationName;

- (void)uploadOneImageWith:(UIImage *)img imagefileNameKey:(NSString*)imagefileNameKey  imagePostKeyName:(NSString*)imagePostKeyName postURL:(NSString*)postURLStr parameters:(NSDictionary*)parameters  notificationName:(NSString*)notificationName;

- (void)uploadWithOutUseQINIUForImage:(UIImage *)image imagePostKeyName:(NSString*)name fileName:(NSString*)fileName  postURL:(NSString*)postURLStr parameters:(NSDictionary*)parameters notificationName:(NSString*)notificationName;

/// 上传图片组
/// @param imageDataArr s图片数组
/// @param imagefileNameKey 和后台协定h链接后缀

-(void)uploadImagesWith:(NSArray<UIImage *>*)imageDataArr
 imagefileNOPathNameKey:(NSString*)imagefileNameKey
            andImgBlock:(UpImgsRequest)imgPathsBlock;
@end


